/**
 * 
 */
package com.feonix.implement;

/**
 * @CopyRight (c)1993-2017
 * @Project common_practice
 * @Comments 请输入该类的描述
 * @NameSpace com.feonix.implement
 * @Author Feonixzw
 * @CreateDate 2017年12月18日
 */
public class DelegateClassInpl implements DelegateClass {
	
	public void main() {
		Entity entity = new Entity();
		entity.setDelegate(this);
		
		DelegateClass delegateClass = entity.getDelegate();
		for(int i=0;i <10; i++){
			delegateClass.run(i+"");
		}
	}

	@Override
	public void run(String str) {
		System.out.println("================"+str);
	}
	
	public static void main(String[] args) {
		DelegateClassInpl impl = new DelegateClassInpl();
		impl.main();
	}

}

class Entity{
	
	private DelegateClass delegate;

	public DelegateClass getDelegate() {
		return delegate;
	}

	public void setDelegate(DelegateClass delegate) {
		this.delegate = delegate;
	}
	
}
